<?php
class SearcherWidget extends YWidget{
	public $id = null;
	public $class = null;
	public $tips = null;
	public $search_btn_text = '搜索';
	public $name = 'keyword';
	public $value = '';
	
	public function init(){
		if($this->class !== null){
			$this->class .= ' ';
		}
		$this->class .= $this->widget_class . ' ' . $this->widget_class . '_' . $this->tpl;
	}
	
	public function run(){
		$this->render($this->class_name . '/' . $this->tpl, array(
			'id'				=> $this->id,
			'class'				=> $this->class,
			'search_btn_text' 	=> $this->search_btn_text,
			'name' 				=> $this->name,
			'value' 			=> $this->value,
			'hot_key_words' 	=> array('Mac Pro', 'iPad', '魅族 MX2', '特价', 'iPhone5')
		));
	}
}

?>